<script>
  import {getUserInfo} from "./common/api/oauthServer/user";
  import {getToken} from  './common/utils/auth'
  // import store from "./store";
	export default {
		onLaunch: function() {
			console.log('App Launch')
      let token = getToken();
      if (token){
        getUserInfo().then(res=>{
            let userInfo = res;
            userInfo.access_token= token
            this.$store.commit('SET_USERINFO',userInfo)
        })
        console.log('websocket链接')
        this.$websocket.connectSocketInit()
      }

		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
  @import 'common/css/common.css';
</style>
